package com.gzx.qc.modular.inspection.mapper;

import com.gzx.qc.modular.inspection.entity.GzxManualQualityInspection;
import com.gzx.qc.modular.inspection.vo.GzxInspectionStatusVo;
import com.gzx.qc.modular.inspection.vo.GzxManualQualityInspectionVo;
import org.apache.ibatis.annotations.Select;
import vip.xiaonuo.common.mapper.BaseMapperPlus;

import java.util.List;

/**
 * @author xbl
 */
public interface GzxManualQualityInspectionMapper extends BaseMapperPlus<GzxManualQualityInspection, GzxManualQualityInspectionVo> {

    @Select({
            "<script>",
            "select callee,dept_id as deptId,call_type as callType,file_url as fileUrl from gzx_ht_call_receipt_business where id = ${id}" +
                    "</script>"
    })
    GzxManualQualityInspectionVo getReceiptById(Long id);

    @Select({
            "<script>",
            "select id,inspection,remark,call_id as callId from gzx_ht_manual_quality_inspection where call_id in " +
                    "<foreach collection='list' item='item' open='(' separator=',' close=')'>" +
                    "#{item}" +
                    "</foreach> " +
                    "</script>"
    })
    List<GzxInspectionStatusVo> getStatusList(List<String> callIds);
}
